/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package upc.jfactory.scp.jpa.bean;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
/**
 *
 * @author Diego
 */
@Entity
@Table(name = "Competencias_X_OfertaLaboral", catalog = "DAEPIFS_DB", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "CompetenciasXOfertaLaboral.findAll", query = "SELECT c FROM CompetenciasXOfertaLaboral c"),
    @NamedQuery(name = "CompetenciasXOfertaLaboral.findByCompetenciasofertaId", query = "SELECT c FROM CompetenciasXOfertaLaboral c WHERE c.competenciasofertaId = :competenciasofertaId"),
    @NamedQuery(name = "CompetenciasXOfertaLaboral.findByCompetenciaId", query = "SELECT c FROM CompetenciasXOfertaLaboral c WHERE c.competenciaId = :competenciaId"),
    @NamedQuery(name = "CompetenciasXOfertaLaboral.findByOfertalaboralId", query = "SELECT c FROM CompetenciasXOfertaLaboral c WHERE c.ofertalaboralId = :ofertalaboralId")})
public class CompetenciasXOfertaLaboral implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "competenciasoferta_id", nullable = false)
    private Integer competenciasofertaId;
    @Basic(optional = false)
    @Column(name = "competencia_id", nullable = false)
    private int competenciaId;
    @Basic(optional = false)
    @Column(name = "ofertalaboral_id", nullable = false)
    private int ofertalaboralId;

    public CompetenciasXOfertaLaboral() {
    }

    public CompetenciasXOfertaLaboral(Integer competenciasofertaId) {
        this.competenciasofertaId = competenciasofertaId;
    }

    public CompetenciasXOfertaLaboral(Integer competenciasofertaId, int competenciaId, int ofertalaboralId) {
        this.competenciasofertaId = competenciasofertaId;
        this.competenciaId = competenciaId;
        this.ofertalaboralId = ofertalaboralId;
    }

    public Integer getCompetenciasofertaId() {
        return competenciasofertaId;
    }

    public void setCompetenciasofertaId(Integer competenciasofertaId) {
        this.competenciasofertaId = competenciasofertaId;
    }

    public int getCompetenciaId() {
        return competenciaId;
    }

    public void setCompetenciaId(int competenciaId) {
        this.competenciaId = competenciaId;
    }

    public int getOfertalaboralId() {
        return ofertalaboralId;
    }

    public void setOfertalaboralId(int ofertalaboralId) {
        this.ofertalaboralId = ofertalaboralId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (competenciasofertaId != null ? competenciasofertaId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CompetenciasXOfertaLaboral)) {
            return false;
        }
        CompetenciasXOfertaLaboral other = (CompetenciasXOfertaLaboral) object;
        if ((this.competenciasofertaId == null && other.competenciasofertaId != null) || (this.competenciasofertaId != null && !this.competenciasofertaId.equals(other.competenciasofertaId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "upc.jfactory.scp.jpa.bean.CompetenciasXOfertaLaboral[competenciasofertaId=" + competenciasofertaId + "]";
    }

}
